package com.lm.gateway.config;

import com.lm.gateway.resolver.RemoteAddrKeyResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 路由限流配置
 *
 * @author lm
 * @date
 */
@Configuration
public class RateLimiterConfig {

    /**
     * IP限流
     *
     * @return
     */
    @Bean(name = RemoteAddrKeyResolver.BEAN_NAME)
    public RemoteAddrKeyResolver remoteAddrKeyResolver() {
        return new RemoteAddrKeyResolver();
    }

}